package com.webreport.service;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.webreport.exception.DaoException;
import com.webreport.exception.ManagerException;

/**
 * Generic Manager that talks to GenericDao to CRUD POJOs.
 * 
 * <p>
 * Extend this interface if you want typesafe (no casting necessary) managers
 * for your domain objects.
 * 
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 * @param <T>
 *            a type variable
 * @param <PK>
 *            the primary key for that type
 */
public interface GenericManager<T, PK extends Serializable> {
	List<T> getAll();
	
	T get(PK id);
	
	boolean exists(PK id);
	
	PK insert(T object) throws ManagerException;
	
	T update(T object) throws ManagerException;
	
	
}
